package com.bmth.alise.conf;

import java.io.InputStream;
import java.util.Properties;

public class Configuration {

	private static Configuration conf;
	private static Properties p;

	private Configuration() {
		p = new Properties();
		try {
			InputStream ins = Thread.currentThread().getContextClassLoader()
					.getResourceAsStream("application.properties");
			p.load(ins);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getProperty(String key) {
		if (conf == null) {
			conf = new Configuration();
		}
		return p.getProperty(key);
	}
}
